package com.example.es.search.common.mq;

import lombok.Data;

/**
 *
 * 用于服务之间消息通讯模板
 *
 * @Author 林必昭
 * @Date 2019/9/8 19:34
 */

@Data
public class PostMqIndexMessage {

    private static final String CREATE = "create";
    private static final String UPDATE = "update";
    private static final String REMOVE = "remove";


    private static final int MAX_RETRY = 3;

    private Long postId;
    private String type;
    private int retry = 0;

    public PostMqIndexMessage() {
    }

    public PostMqIndexMessage(Long postId, String type) {
        this.postId = postId;
        this.type = type;
    }

    public PostMqIndexMessage(Long postId, String type, int retry) {
        this.postId = postId;
        this.type = type;
        this.retry = retry;
    }
}
